package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author stylefeng
 * @since 2020-03-26
 */
@TableName("connection")
public class Connection extends Model<Connection> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "connect_id", type = IdType.AUTO)
    private Integer connectId;
    @TableField("user_id")
    private Integer userId;
    @TableField("device_id")
    private Integer deviceId;
    @TableField("server_id")
    private Integer serverId;
    @TableField("allowip_id")
    private Integer allowipId;
    /**
     * 1-正在连接，0-已断开连接
     */
    private Integer status;
    @TableField("pub_key")
    private String pubKey;
    @TableField("private_key")
    private String privateKey;
    @TableField("device_identifier")
    private String deviceIdentifier;
    @TableField("server_ip")
    private String serverIp;
    private String allowip;
    @TableField("create_time")
    private Date createTime;
    @TableField("update_time")
    private Date updateTime;
    private Integer isfree;


    public Integer getConnectId() {
        return connectId;
    }

    public void setConnectId(Integer connectId) {
        this.connectId = connectId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Integer deviceId) {
        this.deviceId = deviceId;
    }

    public Integer getServerId() {
        return serverId;
    }

    public void setServerId(Integer serverId) {
        this.serverId = serverId;
    }

    public Integer getAllowipId() {
        return allowipId;
    }

    public void setAllowipId(Integer allowipId) {
        this.allowipId = allowipId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getPubKey() {
        return pubKey;
    }

    public void setPubKey(String pubKey) {
        this.pubKey = pubKey;
    }

    public String getPrivateKey() {
        return privateKey;
    }

    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }

    public String getDeviceIdentifier() {
        return deviceIdentifier;
    }

    public void setDeviceIdentifier(String deviceIdentifier) {
        this.deviceIdentifier = deviceIdentifier;
    }

    public String getServerIp() {
        return serverIp;
    }

    public void setServerIp(String serverIp) {
        this.serverIp = serverIp;
    }

    public String getAllowip() {
        return allowip;
    }

    public void setAllowip(String allowip) {
        this.allowip = allowip;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getIsfree() {
        return isfree;
    }

    public void setIsfree(Integer isfree) {
        this.isfree = isfree;
    }

    @Override
    protected Serializable pkVal() {
        return this.connectId;
    }

    @Override
    public String toString() {
        return "Connection{" +
        "connectId=" + connectId +
        ", userId=" + userId +
        ", deviceId=" + deviceId +
        ", serverId=" + serverId +
        ", allowipId=" + allowipId +
        ", status=" + status +
        ", pubKey=" + pubKey +
        ", privateKey=" + privateKey +
        ", deviceIdentifier=" + deviceIdentifier +
        ", serverIp=" + serverIp +
        ", allowip=" + allowip +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", isfree=" + isfree +
        "}";
    }
}
